/**
 * @Author: Boring
 * @Description:
 * @File:  pvc
 * @Date: 2024-03-02 14:50
 */

package pvc

import (
	"github.com/gin-gonic/gin"
	"oam-manage-backend/controllers/pvc"
)

func create(pvcGroup *gin.RouterGroup) {
	pvcGroup.POST("/create", pvc.Create)
}

func update(pvcGroup *gin.RouterGroup) {
	pvcGroup.PUT("/update", pvc.Update)
}

func delete(pvcGroup *gin.RouterGroup) {
	pvcGroup.DELETE("/delete", pvc.Delete)
}

func deleteList(pvcGroup *gin.RouterGroup) {
	pvcGroup.POST("/deleteList", pvc.DeleteList)
}

func get(pvcGroup *gin.RouterGroup) {
	pvcGroup.GET("/get", pvc.Get)
}

func list(pvcGroup *gin.RouterGroup) {
	pvcGroup.GET("/list", pvc.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	pvcGroup := g.Group("/pvc")
	create(pvcGroup)
	update(pvcGroup)
	delete(pvcGroup)
	deleteList(pvcGroup)
	get(pvcGroup)
	list(pvcGroup)
}
